package com.hsd.znsh.enums;

import lombok.Getter;

/**
 * Created by wangjc
 * 2017-06-11 18:56
 */
@Getter
public enum ResultEnum {

    SUCCESS(0, "成功"),

    USERNAME_PASSWORD_ERROR(1,"用户名或密码错误"),

    PARAM_ERROR(2, "参数不正确"),

    USERNAME_NOT_EXITS(3, "用户名不存在"),

    PROBE_NAME_EXITS(4, "探头名称已经存在"),

    SENSOR_GROUP_NAME_EXITS(5, "传感器组名称已经存在"),

    PASSWORD_CONFIRMPASSWORD_NOT_SAME(6, "密码和确认密码不相同"),

    ILLEGAL_USERS(7, "非法用户"),

    FARM_EXITS(8, "批次下面有农事记录，不能删除"),

    PICK_EXITS(9, "批次下面有采摘记录，不能删除"),

    USERNAME_EXITS(10, "用户名已经存在"),

    PHONE_EXITS(11, "手机号已经存在"),

    EMAIL_EXITS_USING(12, "邮箱已经被使用"),

    PHONE_NOT_EXITS(13, "手机号不存在"),

    TH_SN_NOT_EXITS(14, "温湿度SN不存在"),

    CO2_SN_NOT_EXITS(15, "CO2SN不存在"),

    LIGHT_SN_NOT_EXITS(16, "光照SN不存在"),

    WATER_EC_SN_NOT_EXITS(17, "水体SN不存在"),

    SECOND_MANAGER_EXITS(18, "二级管理员已经存在"),

    ADD_SELF_ERROR(19, "不允许添加自己为二级管理员"),

    FOGID_ERROR(20, "非法的设备来源"),

    MONITOR_SN_EXITS(21, "探头序列号已经存在"),

    GATEWAY_ID_EXITS(22, "网关ID已经存在"),

    SESSION_INVALID(400, "session失效"),

    SERVER_ERROR(500, "服务器错误"),
    ;

    private Integer code;

    private String message;

    ResultEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
